package application;
import composite.*;

public class Item implements Comparable<Item>
{
	private String name;
	private Liste<Integer> pages;
	
	public Item(String name, Liste<Integer> pages)
	{
		this.name = name;
		this.pages = pages;
	}
	
	public String name()
	{
		return name;
	}
	
	public Liste<Integer> pages()
	{
		return pages;
	}

	@Override
	public int compareTo(Item i)
	{
		return name.compareTo(i.name());
	}
	
	public String toString()
	{
		return "["+name+" : "+pages.toString() +"]";
	}
}
